<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/auth/templates/template.xhtml">
	<ui:define name="pageTitle">Lista de Itens em Estoque</ui:define>
	<ui:define name="body">
		<f:view>
			<h:form>
				<h:panelGrid cellspacing="10px" styleClass="center">
					<f:facet name="header">Lista de Item em Estoque</f:facet>
					<p:dataTable var="itemEstoque"
						value="#{estoqueRSBean.itensEstoque}" style="text-align:center;"
						emptyMessage="Não existem registros para esta tabela"
						paginator="true" rows="10"
						paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						rowsPerPageTemplate="5,10,15">
						<p:column headerText="Local">
							<h:outputText value="#{itemEstoque.local}" />
						</p:column>
						<p:column headerText="Código Produto">
							<h:outputText value="#{itemEstoque.produto.idProduto}" />
						</p:column>
						<p:column headerText="Produto">
							<h:outputText
								value="#{itemEstoque.produto.categoria.nome} #{itemEstoque.produto.descricao}" />
						</p:column>
						<p:column headerText="Preço">
							<h:outputText value="#{itemEstoque.preco}">
								<f:convertNumber currencyCode="BRL" type="currency"
									minFractionDigits="3" />
							</h:outputText>
						</p:column>
						<p:column headerText="Vencimento">
							<h:outputText value="#{itemEstoque.vencimento.time}">
								<f:convertDateTime dateStyle="medium" type="date" />
							</h:outputText>
						</p:column>
					</p:dataTable>
				</h:panelGrid>
			</h:form>
		</f:view>
	</ui:define>
</ui:composition>

</html>